import request from '@/utils/request'

// 第三方子订单添加赠品
export function addGift(thirdSubOrderId, goodsNum) {
  return request({
    url: '/order/thirdSub/addGift',
    method: 'post',
    data: { thirdSubOrderId, goodsNum }
  })
}

// 校验并获取修改商品列表
export function checkAndGetChangeList(data) {
  return request({
    url: '/order/thirdSub/checkAndGetChangeList',
    method: 'post',
    data: data
  })
}

// 重新添加子订单
export function doReset(data) {
  return request({
    url: '/order/thirdSub/doReset',
    method: 'post',
    data: data
  })
}

// 修改商品
export function doChange(data) {
  return request({
    url: '/order/thirdSub/doChange',
    method: 'post',
    data: data
  })
}

// 删除子订单
export function deleteSubOrder(thirdSubOrderIds) {
  return request({
    url: '/order/thirdSub/deleteSubOrder',
    method: 'post',
    data: { thirdSubOrderIds }
  })
}
